package com.erlinyou.im.web.controller.base.message;

public enum CallRoleType {
	
	OWNER(10), MEMBER(30), NONE(50), UNKNOW(0);
	private Integer code;

	CallRoleType(Integer code) {
		this.code = code;
	}
	
	public static CallRoleType valueOfStr(String num) {
		switch (num) {
		case "10":
			return OWNER;
		case "30":
			return MEMBER;
		case "50":
			return NONE;
		default:
			return UNKNOW;
		}
	}
	
	public static CallRoleType valueOf(int num) {
		switch (num) {
		case 10:
			return OWNER;
		case 30:
			return MEMBER;
		case 50:
			return NONE;
		default:
			return UNKNOW;
		}
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
